package main

import "fmt"

func def1() {
	fmt.Println("start")
	defer fmt.Println(1)
	defer fmt.Println(2)
	defer fmt.Println(3)
	fmt.Println("end")
}

func def2() {
	count := 1
	fmt.Println("start")
	defer func(count int) {
		fmt.Println("defer: ", count)
	}(count)
	fmt.Println("func: ", count)
	count++
	defer fmt.Println(count)
	count++
	defer fmt.Println(count)
}

func main() {
	// def1()
	// def2()
	line := "1 2 3"
	width := 40
	fmt.Printf("%[2]*[1]s\n", line, width)
	fmt.Printf("%[1]*s\n", width, line)
}
